package com.lashou.labelutil.model;

import java.io.Serializable;
import java.util.Date;

public class Deal implements Serializable
{
    private static final long serialVersionUID = 4534616962081023762L;
    
	private String site = null;
	private String city = null;
	private String url = null;
	private String description = null;
	private String imageURL = null;

	private Integer id;
	private double price = 0d;
	private double originalPrice = 0d;
	private double discount = 0d;
	private double save = 0d;
	private int buyNumber;
	private double totalPrice = 0d;
	private String currency;
	private Date startDate;
	private Date endDate;
	private Date crawlDate;
	private String marker;
	private Double reevaluatedBuyNumber;
	private String md5;
	
	//以下聚划算專用
	private int commentsNumber = 0;//評價人數
	private Double commentsScore = 0d;//得分
	private String companyName;//公司名	
	private String businessName;//淘寶店鋪名
	private String taobaoProductsURL; 
	private String companyAddrees;
	

	public Deal()
	{
	}
	
	// force the setting of site and city in constructor
	public Deal(String site, String city)
	{
		this.site = site;
		this.city = city;
	}

	/** Return a (hopefully unique) identifier for this deal, which
	 *  is the concatenation of site, city, startYear, startMonth,
	 *  startDay, price, originalPrice, and imageURL.
	 */
	public String getHash()
	{
		String hash = this.site + this.city + this.startDate.toString() + this.price + this.originalPrice + this.imageURL;
		return hash;
	}	
	public String getTaobaoProductsURL() {
		return taobaoProductsURL;
	}

	public void setTaobaoProductsURL(String taobaoProductsURL) {
		this.taobaoProductsURL = taobaoProductsURL;
	}

	
	
	

	public String getCompanyAddrees() {
		return companyAddrees;
	}

	public void setCompanyAddrees(String companyAddrees) {
		this.companyAddrees = companyAddrees;
	}

	public String getCurrency()
	{
		return currency;
	}

	public void setCurrency(String currency)
	{
		this.currency = currency;
	}

	public Date getStartDate()
	{
		return startDate;
	}

	public void setStartDate(Date startDate)
	{
		this.startDate = startDate;
	}

	public Date getEndDate()
	{
		return endDate;
	}

	public void setEndDate(Date endDate)
	{
		this.endDate = endDate;
	}

	public void setBuyNumber(int buyNumber)
	{
		this.buyNumber = buyNumber;
	}

	public int getBuyNumber()
	{
		return buyNumber;
	}

	public void setTotalPrice(double totalPrice)
	{
		this.totalPrice = totalPrice;
	}

	public double getTotalPrice()
	{
		return totalPrice;
	}

	public void setId(Integer id)
    {
	    this.id = id;
    }

	public Integer getId()
    {
	    return id;
    }

	public String getSite()
    {
    	return site;
    }

	public void setSite(String site)
    {
    	this.site = site;
    }

	public String getCity()
    {
    	return city;
    }

	public void setCity(String city)
    {
    	this.city = city;
    }

	public String getUrl()
    {
    	return url;
    }

	public void setUrl(String url)
    {
    	this.url = url;
    }

	public String getDescription()
    {
    	return description;
    }

	public void setDescription(String description)
    {
    	this.description = description;
    }

	public String getImageURL()
    {
    	return imageURL;
    }

	public void setImageURL(String imageURL)
    {
    	this.imageURL = imageURL;
    }

	public double getPrice()
    {
    	return price;
    }

	public void setPrice(double price)
    {
    	this.price = price;
    }

	public double getOriginalPrice()
    {
    	return originalPrice;
    }

	public void setOriginalPrice(double originalPrice)
    {
    	this.originalPrice = originalPrice;
    }

	public double getDiscount()
    {
    	return discount;
    }

	public void setDiscount(double discount)
    {
    	this.discount = discount;
    }

	public double getSave()
    {
    	return save;
    }

	public void setSave(double save)
    {
    	this.save = save;
    }

	public void setCrawlDate(Date crawlDate)
    {
	    this.crawlDate = crawlDate;
    }

	public Date getCrawlDate()
    {
	    return crawlDate;
    }

	public String getMarker()
	{
	  return marker;
	}

	public void setMarker(String marker)
	{
	  this.marker = marker;
	}

	public Double getReevaluatedBuyNumber()
	{
	  return reevaluatedBuyNumber;
	}

	public void setReevaluatedBuyNumber(Double reevaluatedBuyNumber)
	{
	  this.reevaluatedBuyNumber = reevaluatedBuyNumber;
	}

	public void setMd5(String md5)
	{
	  this.md5 = md5;
	}

	public String getMd5()
	{
	  return md5;
	}
	
	public int getCommentsNumber() {
		return commentsNumber;
	}

	public void setCommentsNumber(int commentsNumber) {
		this.commentsNumber = commentsNumber;
	}

	public Double getCommentsScore() {
		return commentsScore;
	}

	public void setCommentsScore(Double commentsScore) {
		this.commentsScore = commentsScore;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public String getBusinessName() {
		return businessName;
	}

	public void setBusinessName(String businessName) {
		this.businessName = businessName;
	}
}
